import React, { useEffect, useState } from 'react'
import { useParams } from 'react-router-dom'
import { getLibraryCommentList } from './api/libraryService'

export default function LibraryComment() {
    const { id }: any = useParams()

    // 评论列表
    const [comments, setComments] = useState([])
    // 分页页码
    const [pageNum, setPageNum] = useState(1)
    // 分页列表
    const [pageSize, setPageSize] = useState(10)
    // 总页数
    const [pages, setPages] = useState(1)

    async function getComments(params: any) {
        const res = await getLibraryCommentList(params)
        console.log(res);

    }

    useEffect(() => {
        getComments({ pageNum, pageSize, libraryId: id })
    }, [])


    return (
        <div>LibraryComment</div>
    )
}
